<template>
  <view>
    <view>
      <!--      过渡效果-->
      <view
        v-if="scrollTopNo"
        class="topNav"
        :style="{ height: moveHeght, opacity: move }"
      >
        <view class="logotext-con" :style="{ height: moveHeght }">
          <view
            class="logotext"
            :style="{ paddingTop: movePadding, fontSize: moveSize }"
            >二手回收交流群</view
          >
        </view>
      </view>
      <view class="goIn" :style="{ height: '220px' }">
        <u-swiper
          height="220px"
          radius="0"
          :list="listAd"
          @click="clickAD"
          indicator
          indicatorMode="line"
          keyName="img"
          :interval="5000"
          circular
        ></u-swiper>
      </view>

      <!-- 吸顶 -->
      <u-sticky bgColor="#fff" :offset-top="bgHeight">
        <u-notice-bar
          v-if="notices.content != null"
          :text="notices.content"
          color="#2DBB55"
          :speed="60"
          @click="showPops"
        ></u-notice-bar>
        <u-search
          bgColor="#F5F5F5"
          placeholder="输入群名称/群介绍"
          v-model="keyword"
          :showAction="false"
          :clearabled="false"
          margin="20rpx"
          shape="square"
          @search="searchGoup"
        ></u-search>
        <u-tabs
          lineColor="#2DBB55"
          :activeStyle="{ color: '#2DBB55' }"
          :inactiveStyle="{ color: '#606266' }"
          :list="listTab"
          @click="clickTab"
          :current="current"
          @change="tabChage"
        ></u-tabs>
      </u-sticky>

      <!--      列表   -->
      <view style="z-index: 999">
        <view v-for="(item, index) in indexList" :key="index">
          <u-cell
            :title="
              item.name.length > 12
                ? item.name.substr(0, 11) + '...'
                : item.name
            "
            :label="
              item.introduce.length > 15
                ? item.introduce.substr(0, 14) + '...'
                : item.introduce
            "
          >
            <u-avatar
              slot="icon"
              shape="square"
              size="50"
              :src="item.head_url"
              customStyle="margin: -3px 5px -3px 0"
            ></u-avatar>
            <view class="myButton" slot="value">
              <view v-if="item.sts == 3" class="chatview">
                去聊天
                <cell
                  iconUrl=""
                  contactText=""
                  class="cellview"
                  :completemessage="completemessage"
                  :url="item.url"
                />
              </view>
              <u-button
                @click="clickItem(item)"
                v-else
                :text="
                  item.sts == 3
                    ? '已加入'
                    : item.sts == 2
                    ? '审核中'
                    : item.is_full == 1
                    ? '满员'
                    : '加入'
                "
                :type="
                  item.sts == 3
                    ? 'info'
                    : item.sts == 2
                    ? 'error'
                    : item.is_full == 1
                    ? 'info'
                    : 'success'
                "
                :plain="true"
                shape="circle"
              >
              </u-button>
            </view>
          </u-cell>
        </view>
      </view>
      <u-empty
        :show="isEmpty"
        mode="data"
        icon="http://cdn.uviewui.com/uview/empty/data.png"
      >
      </u-empty>
    </view>
    <!-- 万人群 -->
    <view class="thousands-icon" @click="handlethousandsGroup">
      <u-image
        src="/static/group-1.png"
        width="212rpx"
        height="200rpx"
      ></u-image>
    </view>
    <zdy-tabbar :value="value"></zdy-tabbar>
    <u-popup
      :safeAreaInsetBottom="true"
      :safeAreaInsetTop="true"
      :show="showPop"
      mode="center"
      @close="closePop"
      :round="10"
    >
      <view class="u-popup-slot" scroll-y>
        <view
          style="
            display: flex;
            flex-direction: row;
            justify-content: center;
            margin-right: 20rpx;
            margin-left: 20rpx;
          "
        >
          <text style="font-size: 32rpx; font-weight: bold">{{
            notices.title
          }}</text>
        </view>
        <scroll-view scroll-y style="max-height: 800rpx">
          <u-read-more :showHeight="400">
            <rich-text
              style="margin: 20rpx; padding-bottom: 150rpx"
              :nodes="notices.content"
            ></rich-text>
          </u-read-more>
        </scroll-view>

        <view
          style="display: flex; flex-direction: row; justify-content: center"
        >
          <u-button
            customStyle="width: 400rpx;margin-bottom: 40rpx;margin-top: 20rpx;"
            type="success"
            shape="circle"
            @click="closePop"
            >我知道了</u-button
          >
        </view>
      </view>
    </u-popup>
    <u-popup
      :safeAreaInsetBottom="true"
      :safeAreaInsetTop="true"
      closeable
      :show="showPopApply"
      mode="center"
      @close="closePopApply"
      :round="10"
    >
      <view class="u-popup-slot">
        <view
          style="display: flex; flex-direction: row; justify-content: center"
        >
          <text style="font-size: 32rpx; font-weight: bold">进群申请</text>
        </view>
        <scroll-view scroll-y style="max-height: 800rpx">
          <view style="display: block; margin-left: 30rpx; margin-right: 30rpx">
            <u-text
              customStyle="margin-top: 20rpx;"
              :text="'群聊名称:' + groupName"
            ></u-text>
            <u-text customStyle="margin-top: 20rpx;" text="*您的称呼"></u-text>
            <u-input
              customStyle="margin-top: 20rpx;"
              v-model="addGroup.name"
              placeholder="请输入您的称呼"
              clearable
            ></u-input>
            <u-text
              customStyle="margin-top: 20rpx;"
              :text="'您的手机号:' + phoneRes"
            ></u-text>
            <u-text
              customStyle="margin-top: 20rpx;"
              text="您的企业名称"
            ></u-text>
            <u-input
              customStyle="margin-top: 20rpx;"
              v-model="addGroup.company"
              placeholder="请输入您的企业名称"
              clearable
            ></u-input>
            <u-text customStyle="margin-top: 20rpx;" text="企业简介"></u-text>
            <u--textarea
              customStyle="margin-top: 20rpx;"
              height="260rpx"
              :maxlength="-1"
              :autoHeight="autoHeight"
              @linechange="linechange"
              placeholder="举例：专业回收各种工厂废钢铁、铜、 铝、不锈钢，铝合金等各种废金属"
              v-model="addGroup.info"
            ></u--textarea>
          </view>
        </scroll-view>

        <view
          style="
            display: flex;
            flex-direction: row;
            justify-content: center;
            margin-top: 40rpx;
          "
        >
          <u-button
            customStyle="width: 200rpx;margin-bottom: 40rpx;"
            type="success"
            shape="circle"
            @click="addGroupUser"
            >申请加入</u-button
          >
        </view>
      </view>
    </u-popup>
    <!-- 登录弹框 -->
    <u-popup
      :safeAreaInsetBottom="true"
      :safeAreaInsetTop="true"
      closeable
      :show="showPopLogin"
      mode="center"
      @close="closePopLogin"
      :round="10"
    >
      <view style="margin-top: 50rpx">
        <u-image
          src="/static/logo_pop.png"
          width="349rpx"
          height="304rpx"
          custom-style="margin-left: 155rpx;margin-right: 155rpx"
        ></u-image>

        <view class="agree">
          <u-checkbox-group>
            <u-checkbox
              @change="radioChange"
              activeColor="#2DBB55"
              shape="circle"
            >
            </u-checkbox>
          </u-checkbox-group>

          <text class="tip-text">已阅读并同意</text>
          <text class="reg-agreement-privacy-policy" @click="regAgreementClick"
            >《用户协议》</text
          >
          <text class="tip-text">及</text>
          <text
            class="reg-agreement-privacy-policy"
            @click="regAgreementYinSiClick"
            >《隐私政策》</text
          >
        </view>

        <view
          style="
            display: flex;
            flex-direction: row;
            justify-content: center;
            margin-top: 20rpx;
          "
        >
          <u-button
            customStyle="width: 400rpx;margin-bottom: 40rpx;"
            type="success"
            shape="circle"
            open-type="getPhoneNumber"
            @getphonenumber="wxLogin"
            v-if="check"
            >手机号一键登录</u-button
          >
          <u-button
            v-else
            customStyle="width: 400rpx;margin-bottom: 40rpx;"
            type="success"
            shape="circle"
            @click="checkboxAgree()"
            >手机号一键登录</u-button
          >
        </view>
      </view>
    </u-popup>

    <!-- 隐私协议弹框 -->
    <u-popup
      :safeAreaInsetBottom="true"
      :safeAreaInsetTop="true"
      :show="showPrivacy"
      mode="bottom"
      :round="10"
      @close="handleRejectPrivacy"
    >
      <view class="privacy-container">
        <view class="title">用户隐私保护提示</view>
        <view class="content"
          >在你使用二手回收交流群服务之前，请仔细阅读
          <text class="link" @tap="handleOpenPrivacyContract">
            《二手回收交流群 小程序隐私保护指引》</text
          >，如你同意该指引，请点击“同意”开始使用本小程序。</view
        >
        <view class="button-box">
          <button type="default" class="button" @tap="handleRejectPrivacy">
            拒绝
          </button>
          <button
            type="primary"
            class="button"
            id="agree-btn"
            open-type="agreePrivacyAuthorization"
            @agreeprivacyauthorization="handleAgreePrivacyAuthorization"
          >
            同意
          </button>
        </view>
      </view>
    </u-popup>
  </view>
</template>

<script>
import {
  getNotice,
  getAD,
  getGoupCate,
  getGoup,
  noticeCount,
  userGroupAdd,
  ownToChat,
  userGroupCheck,
  wxSubscribe,
} from '@/api/home.js';
import { ownInfo, getWxPhone, login } from '@/api/my.js';
export default {
  data() {
    return {
      // 获取整个导航栏高度
      bgHeight: this.ToolClass.getNavtionBarAllHeightInt(),
      // 获取微信胶囊高度
      topHeigh: this.ToolClass.getWXJNHeightInt(),
      scrollTopNo: false,
      isMove: false,
      listAd: [
        // 'https://cdn.uviewui.com/uview/swiper/swiper1.png',
        // 'https://cdn.uviewui.com/uview/swiper/swiper2.png',
        // 'https://cdn.uviewui.com/uview/swiper/swiper3.png',
      ],
      keyword: '',
      value: 0,
      listTab: [],
      current: 0,
      indexList: [],
      groupName: '',
      phone: uni.getStorageSync('phone'),
      showPopApply: false,
      addGroup: {
        name: '',
        company: '',
        info: '',
        group_id: '',
        app_id: 'wx07c6c7321f12486f',
      },
      showPop: false,
      pageNumber: 1,
      noticesId: '',
      cate_id: null,
      isLogin: uni.getStorageSync('isLogin') || false,
      showPopLogin: false,
      check: false,
      move: 0,
      moveHeght: 0,
      movePadding: 0,
      moveSize: '',
      notices: {},
      isEmpty: false,
      autoHeight: false,
      groupChat: {},
      showPrivacy: false, // 隐私协议弹窗
    };
  },
  computed: {
    phoneRes() {
      if (this.phone != null && this.phone != '') {
        const reg = /^(\d{3})\d{4}(\d{4})$/;
        return this.phone.replace(reg, '$1****$2');
      } else {
        return this.phone;
      }
    },
  },
  onShareAppMessage() {
    const promise = new Promise((resolve) => {
      setTimeout(() => {
        resolve({
          title: '二手回收交流群',
        });
      }, 2000);
    });
    return {
      title: '二手回收交流群',
      path: 'pages/index/index',
      imageUrl: '../../static/share.png',
      // promise
    };
  },
  onShow() {
    this.value = 0;
    this.phone = uni.getStorageSync('phone');
    this.isLogin = uni.getStorageSync('isLogin') || false;
    uni.showShareMenu({
      withShareTicket: true,
      menus: ['shareAppMessage', 'shareTimeline'],
    });
    this.getNotices();
    // this.goToH5("https://work.weixin.qq.com/gm/1a0452ab53adfeb4a4a58a4ec6b261f8")
  },
  onPageScroll(ee) {
    // console.log(ee.scrollTop)
    if (ee.scrollTop <= 160) {
      this.move = ee.scrollTop / 160;
      this.moveHeght = this.bgHeight * this.move + 'px';
      this.movePadding = this.topHeigh * this.move + 'px';
      this.moveSize = 36 * this.move + 'rpx';
    } else if (this.move < 1) {
      this.move = 1;
      this.moveHeght = this.bgHeight * this.move + 'px';
      this.movePadding = this.topHeigh * this.move + 'px';
      this.moveSize = 36 * this.move + 'rpx';
    }

    this.isMove = ee.scrollTop >= 160;
    this.scrollTopNo = ee.scrollTop > 10;
  },
  onPullDownRefresh() {
    this.getNotices();
  },
  onReachBottom() {
    this.loadmore();
  },
  methods: {
    getPrivacy() {
      // 查询微信侧记录的用户是否有待同意的隐私政策信息,未加
      wx.getPrivacySetting({
        success: (res) => {
          // 返回结果为: res = { needAuthorization: true/false, privacyContractName: '《xxx隐私保护指引》' }
          if (res.needAuthorization) {
            // 需要弹出隐私协议
            this.showPrivacy = true;
          } else {
            // 用户已经同意过隐私协议，所以不需要再弹出隐私协议，也能调用已声明过的隐私接口
            console.log('用户已经同意过隐私协议');
            this.showPrivacy = true;
          }
        },
        fail: () => {},
        complete: () => {},
      });
    },
    // 用户同意隐私协议事件回调
    handleAgreePrivacyAuthorization() {
      this.showPrivacy = false;
    },
    // 用户拒绝隐私协议事件回调
    handleRejectPrivacy() {
      this.showPrivacy = false;
    },
    // 打开隐私协议页面
    handleOpenPrivacyContract() {
      wx.openPrivacyContract({
        success: () => {}, // 打开成功
        fail: () => {}, // 打开失败
        complete: () => {},
      });
    },
    linechange(e) {
      this.autoHeight = e.detail.lineCount > 8;
    },
    checkboxAgree() {
      if (!this.check) {
        uni.showToast({
          title: '请阅读并勾选页面底部协议！',
          icon: 'none',
        });
        return;
      }
    },

    regAgreementClick() {
      this.goToH5(uni.$u.http.config.baseURL + '/point/mini_user/');
    },
    regAgreementYinSiClick() {
      this.goToH5(uni.$u.http.config.baseURL + '/point/mini_secret/');
    },
    radioChange(e) {
      this.check = e;
    },
    async getData() {
      ownInfo().then((res) => {
        this.addGroup = {
          ...this.addGroup,
          ...res,
        };
        this.phone = res.phone;
        this.showPopApply = true;
      });
    },
    clickAD(item) {
      switch (this.listAd[item].method) {
        case 2:
          uni.navigateTo({
            url: this.listAd[item].jump_app_url,
          });
          break;
        case 3:
          this.goToH5(this.listAd[item].url);
          break;
        case 4:
          let this_ = this;
          uni.navigateToMiniProgram({
            appId: this.listAd[item].jump_app_id, //被跳转的appId
            path: this.listAd[item].jump_app_url, //要跳转的目标小程序（B小程序）的路径
            extraData: {
              //需要传递给目标小程序的参数
              name: 'A小程序传递的参数',
            },
            envVersion: 'release', //跳转的版本：develop（开发版），trial（体验版），release（正式版）
            success(res) {
              // 打开成功
              console.log(res);
            },
            fail(res) {
              // 打开失败
              console.log(res);
            },
          });
          break;
      }
    },
    tabChage(res) {
      console.log(res);
    },
    // clearGroup() {
    // 	this.keyword = ""
    // 	if (this.listTab[0].id == "0") {
    // 		this.listTab.shift()
    // 		setTimeout(() => {
    // 			this.current = 0
    // 		}, 100)
    // 	}
    // 	this.cate_id = this.listTab[0].id
    // 	this.getListData()
    // },
    clickTab(res) {
      if (res.index == 0 && this.listTab[0].id == '0') {
        return;
      }
      this.current = res.index;
      if (this.listTab[0].id == '0') {
        this.listTab.shift();
        setTimeout(() => {
          this.current = res.index - 1;
        }, 100);
      }

      this.cate_id = res.id;
      this.getListData();
    },
    // cell点击
    completemessage(res) {},
    async addGroupUser() {
      if (this.addGroup.name == '') {
        uni.showToast({
          title: '请输入您的称呼',
          icon: 'none',
        });
        return;
      }
      this.addGroup.app_id = 'wx07c6c7321f12486f';
      userGroupAdd(this.addGroup)
        .then((res) => {
          // console.log("sakdjkajk")
          // if (res.data.code === 200) {
          // this.showPopApply = false
          // this.getListData()
          // } else {
          // 	this.showPopApply = false
          // }
          const tmplId = 'kB1Xxd9eouLvs6JD6C4p-H7p72k20JLSy8hhwGL9kAM';
          wx.requestSubscribeMessage({
            tmplIds: [tmplId], //模板id，可以写多个
            success: (res) => {
              //成功回调
              if (res[tmplId] === 'accept') {
                console.log('允许发送通知', res);
                wxSubscribe({ sts: 1 });
              } else {
                console.log('拒绝发送通知', res);
                wxSubscribe({ sts: 2 });
              }
              this.showPopApply = false;
              this.getListData();
            },
            fail: (res) => {
              this.showPopApply = false;
              this.getListData();
            },
          });
        })
        .catch((err) => {
          this.showPopApply = false;
        });
    },
    loadmore(page) {
      this.pageNumber = this.pageNumber + 1;
      getGoup({
        cate_id: this.listTab[0].id == '0' ? '' : this.cate_id,
        name: this.listTab[0].id == '0' ? this.keyword.trim() : '',
        user_id: uni.getStorageSync('id'),
        app_id: 'wx07c6c7321f12486f',
        pageSize: 15,
        pageNumber: this.pageNumber,
      }).then((datas) => {
        this.indexList = [...this.indexList, ...datas.data];
      });
    },
    closePopLogin() {
      this.showPopLogin = false;
    },
    async clickItem(item) {
      this.groupChat = item;
      // uni.login({
      // 	provider: 'weixin', //使用微信登录
      // 	success: function(loginRes) {
      // 		console.log(loginRes);
      // 	}
      // });
      console.log(item);
      // ownToChat({
      // 	group_id: item.id
      // }).then(res => {
      // 	console.log(res)
      // })
      this.addGroup.group_id = item.id;
      this.groupName = item.name;
      if (this.isLogin) {
        // item.sts==3?'去聊天':item.sts==2?'审核中':item.is_full==1?'满员':'加群'
        // sts状态  1 未加入 2 审核中 3已进群
        if (item.sts == 1 && item.is_full == 0) {
          this.getData();
        }
      } else {
        var than = this;
        uni.login({
          provider: 'weixin', //使用微信登录
          success: function (loginRes) {
            console.log(loginRes);
            login({
              code: loginRes.code,
              app_id: 'wx07c6c7321f12486f',
            }).then((data) => {
              if (data == null || data == '') {
                than.showPopLogin = true;
              } else {
                uni.showLoading({
                  title: '正在登录...',
                });
                setTimeout(() => {
                  uni.setStorageSync('token', data.token);
                  uni.setStorageSync('phone', data.phone);
                  uni.setStorageSync('id', data.id);
                  uni.setStorageSync('name', data.name);
                  uni.setStorageSync('isLogin', true);
                  than.isLogin = true;
                  uni.hideLoading();
                  userGroupCheck({ group_id: item.id }).then((res) => {
                    if (res.is_apply == 0 || res.power_sts == 3) {
                      than.getData();
                    }
                    if (res.power_sts == 2) {
                      uni.showToast({
                        title: '您已进群，正在为您刷新数据...',
                        icon: 'none',
                      });
                      setTimeout(function () {
                        than.getListData();
                      }, 1500);
                    }
                    if (res.power_sts == 1) {
                      uni.showToast({
                        title: '进群审核中，正在为您刷新数据...',
                        icon: 'none',
                      });
                      setTimeout(function () {
                        than.getListData();
                      }, 1500);
                    }
                  });
                }, 2000);
              }
            });
          },
        });
      }
    },

    //微信登录
    async wxLogin(e) {
      console.log(e, 'ee');
      if (!e.detail.iv) {
        uni.showToast({
          title: '获取手机号失败',
          icon: 'none',
        });
        return;
      }
      console.log(e.detail.code, '======codecode1111code');
      var than = this;
      getWxPhone({
        code: e.detail.code,
        app_id: 'wx07c6c7321f12486f',
      })
        .then((res) => {
          console.log(res, 'ressssss');
          this.phone = res;
          uni.login({
            provider: 'weixin', //使用微信登录
            success: function (loginRes) {
              login({
                code: loginRes.code,
                phone: res,
                app_id: 'wx07c6c7321f12486f',
              }).then((data) => {
                uni.setStorageSync('token', data.token);
                uni.setStorageSync('phone', data.phone);
                uni.setStorageSync('id', data.id);
                uni.setStorageSync('name', data.name);
                uni.setStorageSync('isLogin', true);
                than.isLogin = true;
                userGroupCheck({ group_id: than.groupChat.id }).then((res) => {
                  if (res == null || res.is_apply == 0 || res.power_sts == 3) {
                    than.getData();
                  }
                  if (res.power_sts == 2) {
                    uni.showToast({
                      title: '您已进群，正在为您刷新数据...',
                      icon: 'none',
                    });
                    setTimeout(function () {
                      than.getListData();
                    }, 1500);
                  }
                  if (res.power_sts == 1) {
                    uni.showToast({
                      title: '进群审核中，正在为您刷新数据...',
                      icon: 'none',
                    });
                    setTimeout(function () {
                      than.getListData();
                    }, 1500);
                  }
                });
                // if (than.groupChat.sts == 1 && than.groupChat.is_full == 0) {
                // 	than.getData()
                // }
                than.showPopLogin = false;
              });
            },
          });
        })
        .catch(() => {});
    },
    // goToH5方法
    goToH5(url) {
      uni.navigateTo({
        url: '/pages-my/pages/webview?url=' + url,
      });
    },
    async getNotices() {
      getNotice({
        app_id: 'wx07c6c7321f12486f',
      }).then((res) => {
        this.notices = res;
        this.noticesId = res.id;
      });
      getAD({
        app_id: 'wx07c6c7321f12486f',
      }).then((res) => {
        this.listAd = res;
      });

      getGoupCate({
        app_id: 'wx07c6c7321f12486f',
      }).then((res) => {
        this.listTab = res;
        if (this.cate_id != this.listTab[this.current].id) {
          this.current = 0;
          this.cate_id = this.listTab[0].id;
        }
        this.getListData();
      });
    },
    async getListData() {
      this.pageNumber = 1;
      getGoup({
        cate_id: this.listTab[0].id == '0' ? '' : this.cate_id,
        name: this.listTab[0].id == '0' ? this.keyword.trim() : '',
        user_id: uni.getStorageSync('id'),
        app_id: 'wx07c6c7321f12486f',
        pageSize: 15,
        pageNumber: this.pageNumber,
      }).then((datas) => {
        this.isEmpty = datas.data.length == 0;
        this.indexList = datas.data;
        uni.stopPullDownRefresh();
      });
    },
    async searchGoup(res) {
      if (
        this.keyword == null ||
        this.keyword == '' ||
        this.keyword.trim() == ''
      ) {
        uni.showToast({
          title: '请输入群名称/群介绍',
          icon: 'none',
        });
        return;
      }
      if (this.listTab[0].id != '0') {
        this.listTab.unshift({
          id: '0',
          name: '搜索结果',
        });
      }
      this.pageNumber = 1;
      this.cate_id = '0';
      getGoup({
        cate_id: '',
        name: this.keyword.trim(),
        app_id: 'wx07c6c7321f12486f',
        user_id: uni.getStorageSync('id'),
        pageSize: 15,
        pageNumber: this.pageNumber,
      }).then((res) => {
        this.current = 0;
        this.isEmpty = res.data.length == 0;
        this.indexList = res.data;
      });
    },
    closePop() {
      this.showPop = false;
    },
    closePopApply() {
      this.showPopApply = false;
    },
    async showPops() {
      this.showPop = true;
      noticeCount({
        id: this.noticesId,
      });
    },
    // 添加专员
    handlethousandsGroup() {
      uni.navigateTo({
        url: `/pages/thousandsGroup/thousandsGroup`,
      });
    },
  },
};
</script>

<style lang="scss" scoped>
.logotext-con {
  padding-left: 30rpx;

  .logotext {
    color: #ffffff;
    font-weight: 600;
  }
}

.myButton {
  width: 160rpx;
}

.u-popup-slot {
  width: 700rpx;
}

// 过渡动画

.topNav {
  position: fixed;
  width: 100%;
  background-color: #2fb14c;
  top: 0;
  z-index: 9999;
}

@keyframes fade {
  from {
    opacity: 0;
    height: 0;
  }

  to {
    opacity: 1;
  }
}

.goIn {
  animation-name: fade;
  animation-duration: 0.5s;
  animation-fill-mode: forwards;
}

/* 获取同意隐私政策和注册协议 */
.agree {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 50rpx;
}

/* 登录即代表您已同意 */
.tip-text {
  color: #666666;
  font-size: 24rpx;
}

/* 隐私政策、注册协议 */
.reg-agreement-privacy-policy {
  color: #2dbb55;
  font-size: 24rpx;
}
.chatview {
  position: relative;
  width: 151rpx;
  height: 74rpx;
  border-radius: 40rpx;
  border: 1rpx solid #5ac725;
  color: #fff;
  background: #5ac725;
  font-size: 28rpx;
  text-align: center;
  line-height: 74rpx;
}
.cellview {
  position: absolute;
  left: 0;
  top: 0;
  width: 95%;
  height: 95%;
  opacity: 0;
}

/** 用户隐私弹窗 */
.privacy-container {
  padding: 0 32rpx 32rpx;
  .title {
    font-size: 36rpx;
    font-weight: bold;
  }
  .content {
    font-size: 32rpx;
    margin-top: 10px;
    line-height: 1.7;
    color: #666666;
  }
  .link {
    color: #2440b3;
  }
  .button-box {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    .button {
      width: 300rpx;
    }
  }
}

/* 添加专员icon */
.thousands-icon {
  position: fixed;
  bottom: 170rpx;
  left: 0;
}
</style>
